package Threadpack;
//How thread execution changes
import java.lang.*;
class trd1 extends Thread
{
	public void run()
	{
		for(int i=1;i<=5;i++)
		{
			System.out.println("From Thread A:i-->"+i);
		}
		System.out.println("Exit From Thread**A**");
	}
}

class trd2 extends Thread
{
	public void run()
	{
		for(int j=1;j<=5;j++)
		{
			System.out.println("From Thread B:j-->"+j);
		}
		System.out.println("Exit From Thread**B**");
	}
}

class trd3 extends Thread
{
	public void run()
	{
		for(int k=1;k<=5;k++)
		{
			System.out.println("From Thread C:k-->"+k);
		}
		System.out.println("Exit From Thread**C**");
	}
}
public class Thread1 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		trd1 obj1 = new trd1();
		trd2 obj2 = new trd2();
		trd3 obj3 = new trd3();
		obj1.start();
		obj2.start();
		obj3.start();
		System.out.println("Exit From Main");
	}

}
